json_str = """
{
  "name": "John",
  "age": 25,
  "xxx": null,
  "isStudent": true,
  "hobbies": ["reading", "playing", "traveling"],
  "address": {
    "street": "123 Main St",
    "city": "New York"
  },
  "scores": [85, 92, 78, 90]
}
"""
import json
# json字符串转dict
json_dict = json.loads(json_str)
print(type(json_dict))
print(json_dict)

# dict 转json字符串
json_str = json.dumps(json_dict)
print(type(json_str))
print(json_str)